let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n153,
                    i =
                    (this && this.__extends) ||
                    ((_n153 = function n(t, e) {
                            return (_n153 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n153(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.SoldierActor = void 0);
                var r = t('BattleActor'),
                    a = t('SoldierInfo'),
                    s = t('AbsActor'),
                    c = t('MathUtils'),
                    l = t('CivilizationMrg'),
                    u = (function(t) {
                        function e(e) {
                            var o = t.call(this) || this;
                            return (
                                (o.camp = 1),
                                o.setType(s.ActorType.Soldier),
                                e && o.setInfo(e),
                                o
                            );
                        }
                        return (
                            i(e, t),
                            (e.prototype.setInfo = function(t) {
                                if (this._info && this._info.id == t)
                                    this._info.setBuff(this.buffCtrl);
                                else {
                                    var e = new a.default(t);
                                    this._info && e.level > this._info.level ?
                                        (this._isShapeshift = !0) :
                                        (this._isShapeshift = !1),
                                        this._info && this._info.targetOff(this),
                                        (this._info = e);
                                    var o = c.default.clamp(
                                            this._info.level - l.CivilizationMrg.ins.id + 1,
                                            1,
                                            6
                                        ),
                                        n = 'Prefab/Soldier/' + this._info.model,
                                        i = 0.1 + (o / 6) * 0.9;
                                    n != this._modelUrl ?
                                        ((this._modelUrl = n),
                                            (this.entity.scale = i),
                                            this.loadModel(n)) :
                                        (this.toScale(i),
                                            this._isShapeshift && this.loadShapeshiftEffect()),
                                        this._info.setBuff(this.buffCtrl);
                                }
                            }),
                            (e.prototype.onInitModel = function(e) {
                                t.prototype.onInitModel.call(this, e),
                                    this._isShapeshift && this.loadShapeshiftEffect();
                            }),
                            (e.prototype.loadShapeshiftEffect = function() {
                                if (this._shapeshiftEffect) this.playShapeshiftEffect();
                                else {
                                    var t = this;
                                    cc.resources.load(
                                        'Prefab/Effect/ShapeshiftEffect',
                                        function(e, o) {
                                            if (!e) {
                                                var n = cc.instantiate(o);
                                                (n.y = -40),
                                                (n.active = !1),
                                                (t._shapeshiftEffect = n.getComponent(sp.Skeleton)),
                                                t.entity.addChild(n),
                                                    t.playShapeshiftEffect();
                                            }
                                        }
                                    );
                                }
                            }),
                            (e.prototype.playShapeshiftEffect = function() {
                                (this._shapeshiftEffect.node.active = !0),
                                this._shapeshiftEffect.setAnimation(0, 'animation', !1),
                                    (this._shapeshiftEffect.node.zIndex = c.default.getZIndex(
                                        this.entity.childrenCount
                                    )),
                                    (this._effTime = 1);
                            }),
                            (e.prototype.onUpdate = function(e) {
                                t.prototype.onUpdate.call(this, e),
                                    this._effTime > 0 &&
                                    ((this._effTime -= e),
                                        this._effTime <= 0 &&
                                        (this._shapeshiftEffect.node.active = !1));
                            }),
                            e
                        );
                    })(r.BattleActor);
                (o.SoldierActor = u), console.log("end");
            module.exports =  e.exports;